<link rel="stylesheet" type="text/css" href="css/table.css" />

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.js"></script>
<script type="text/javascript">
  function HideItem(index)
  {
    <?php $table[0]['class'] = 'sfasgaweg';?>

    index.hide();
    
    return false;
  }
  
  function ShowItem(index)
  {
    var row = $('.row-' + index + ' .hide_item');
    console.info(row);
    row.show();
    
    return false;
  }
</script>


<?php

$table = array(
    array( 
        'class' => 'bold',
        'description' => '',
        'columns' => array('APPRENTICE', 'PRO', 'MASTER')
        ),
    array(
        'class' => 'shadowed bold',
        'description' => 'ELIGIBILIY',
        'columns' => array('', '', ''),
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>DietBets Organized</strong>',
        'columns' =>  array('2', '3', '5')
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>Total Players Recruited</strong>',
        'columns' => array('50', '500', '5,000'),
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>Total Pot Size</strong>',
        'columns' => array('$1,000', '$10,000', '$50,000')
    ),
    array(
        'class' => 'shadowed bold',
        'description' => 'BENEFITS',
        'columns' => array('', '', '')
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>Personal Guru Landing Page</strong><p>Increase your clout by making your achievemnts publicly viewable</p>',
        'columns' => array('--', 'yes', 'yes')
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>Generate Income - % of the Pot</strong><p>Taken from DietBet\'s portion</p>',
        'columns' => array('--', '5%', '10%')
    ),
    array(
        'class' => 'dotted',
        'description' => '<strong>Total Pot Size</strong><p>Designate your portion of the pot to a charity or event</p>',
        'columns' => array('yes', 'yes', 'yes')
    )
);

$colors = array('apprentice', 'pro', 'master');

?>
<table>
<?php
$counter =1;
foreach($table as $row)
{
  print '<tr class="' . $row['class'] . ' row-'. $counter . '">';
  print '<td>' . $row['description'] . '</td>';
  $count = 0;
  foreach($row['columns'] as $value)
  {
    print '<td class="medium-text ' . $colors[$count] . '">' . $value . '</td>';
    $count++;
  }
  print '<td><a class="hide_item" onclick="HideItem($(this)); return false;"></a></td>';
  print '<td><a class="show_item" onclick="ShowItem(' . $counter . '); return false;"></a></td>';
  print '</tr>';
  $counter++;
}
?>
  
</table>
<?php


?>
